package com.hhs.storage.controller;

import com.hhs.storage.bean.ResponseInfo;
import com.hhs.storage.service.BaseLogsService;
import com.hhs.storage.service.BaseUserService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.Map;

@Controller
@Slf4j
public class LoginController {

    @Resource
    private BaseLogsService baseLogsService;
    @Resource
    BaseUserService userService;
    @RequestMapping("oauth")
    @ResponseBody
    public Map oauth(String account, String password){
        System.out.println(password+"==========="+account);
            if(StringUtils.isEmpty(account) ||StringUtils.isEmpty(password) )
                return ResponseInfo.error("请输入参数");
            else
             return userService.oauth(account,password);
    }
}
